﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SmartSpace.Web;
using SmartSpace.Core;
using SmartSapce.ServiceLocation;

namespace SmartSpace.WebApp._console.common
{
    public partial class usergroup_privilege_list : System.Web.UI.Page
    {
        private Guid _groupId { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            _groupId = Request.GetGuid("id");

            ICoreService service = ServiceLocator.Get<ICoreService>();

            ListResult<Privilege> privileges = service.GetPrivileges(_groupId, PrivilegeOwnerType.UserGroup);
            _ctlList.DataSource = privileges.Data;
            _ctlList.DataBind();
        }
    }
}